package cn.yunhe.sao.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class LogAop {
	public static final String edp ="execution(* cn.yunhe.sao.service.*.*(..))";
	
	@Before(edp)
	public void before(JoinPoint jp){
		System.out.println("-----public前置通知-------");
		/*System.out.println(jp.getSignature().getName());
		System.out.println("jp.getClass():"+jp.getClass());
		System.out.println("jp.getClass().getAnnotations():"+jp.getClass().getAnnotations());
		System.out.println("jp.getKind():"+jp.getKind());
		System.out.println("jp.toLongString():"+jp.toLongString());*/
		
		
	}
	
	@After(edp)
	public void after(JoinPoint jp){
		System.out.println("-----public最终通知-------");
	}
	
}
